package homework.mid_autumn_festival.string_exercise;

public class SubStringDemo {
    public static void main(String[] args) {
        String str = "www.tedu.cn";
        String sub = str.substring(4,8);
        System.out.println(sub);//tedu
        sub = str.substring(9);
        System.out.println(sub);//cn
    }
}
